import request from '@/sheep/request';

const ContactApi = {
  // 查询联系人列表
  queryContacts: (data) => {
    return request({
      url: '/relation/contact/queryContacts',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 查询联系人详情
  queryContactDetail: (data) => {
    return request({
      url: '/relation/contact/queryContactDetail',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 删除联系人
  deleteContact: (data) => {
    return request({
      url: '/relation/contact/deleteContact',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 添加或更新联系人
  addOrUpdateContact: (data) => {
    return request({
      url: '/relation/contact/addOrUpdateContact',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },

};

export default ContactApi;
